package player;

import java.awt.Point;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;

import javax.swing.ImageIcon;

public class listener2 implements KeyListener{
	private player jugador;
	public listener2(player p){
		jugador=p;
	}
	public void keyPressed(KeyEvent arg0) {
		switch(arg0.getKeyCode()) {
		case KeyEvent.VK_UP: {
			jugador.setup(true);
			break;
		}
		case KeyEvent.VK_DOWN: {
			jugador.setdown(true);
			break;
		}
			
			
		}
		
		
	}

	@Override
	public void keyReleased(KeyEvent arg0) {
		jugador.seticononormal();
		switch(arg0.getKeyCode()) {
		
		case KeyEvent.VK_UP: {
			jugador.setup(false);
			break;
		}
		case KeyEvent.VK_DOWN: {
			jugador.setdown(false);
			break;
		}
		
	}
	}

	@Override
	public void keyTyped(KeyEvent arg0) {
		
		
	}
}